## Test script for testing remote RPC CALLS WHICH NEED
## admin authentication
##
## Usage: python testAdminXMLRPC.py user pass [local]
import os,sys
import xmlrpclib

user=sys.argv[1]
pw=sys.argv[2]
if len(sys.argv)==4:
    #assume local mode
    server_url = 'http://%s:%s@localhost:8000/provisioner/xmlrpc/call/xmlrpc' % (user,pw)
else:
    server_url = 'http://%s:%s@update.braintrainerplus.com/xmlrpc/call/xmlrpc' % (user,pw)
server = xmlrpclib.Server(server_url)

print server.newPackageUploaded('BingoUnity_0.7.tar.gz.gpg','6ce6ffb104cb6c17c6e58574a3eddad3','BingoUnity_0.7','unity','wine')
print server.newPackageUploaded('btpkivyquiz_1.0.tar.gz.gpg','6916148019d7dffbf6d84c7ade0d30ec','btpkivyquiz_1.0','kivy','python-kivy, gstreamer0.10-plugins-good')
print server.newPackageUploaded('KivyMemory_1.0.tar.gz.gpg','0beca8962e2d9a8c19340eed5a8d10c9','KivyMemory_1.0','kivy','python-kivy, gstreamer0.10-plugins-good')
print server.newPackageUploaded('btpkivy_1.0.tar.gz.gpg','e9acd06eba881677efa638bcb1b80a77','btpkivy_1.0','kivy','python-kivy, gstreamer0.10-plugins-good')

